
// @ts-nocheck
import request from "./request";

//登录  设置昵称头像
export function NickNva(params:any) {
	return request.post("login/nick-ava",params);
}

//获取手机号
export function getPhone(code:string) {
	return request.post("user/get-phone", code);
}

// 获取用户信息
export function getUserInfo() {
	return request.get("user/index");
}

//字典
export function getDictCode(params: { dictCode: string }) {
	return request.post("dict/list/all", params);
}




//etc注销
export function postEtcCancel(params: any) {
	return request.post("etc-cancel/v3", params);
}

// 办理etc
export function doEtc(params: any) {
	return request.post("etc-apply", params);
}

// 获取办理消息模版id列表
export const getEtcApplyStmpIdList = async () => {
    const {code,data,msg}= await request.get("etc-apply/get-stmp-id-list");
    if (code!=='A000'){
        return {}
    }
    return data
}


// 获取注销消息模版id列表
export const getEtcCancelStmpIdList = async () => {
	const {code,data,msg}= await request.get("etc-cancel/get-stmp-id-list");
	if (code!=='A000'){
	    return {}
	}
	return data
}

// 注销订单 获取订单id
export const getEtcOrderId = async (id: any) => {
	const {code,data,msg}= await request.get("etc-cancel/v2/get-orderid/"+id);
	if (code!=='A000'){
		return {}
	}
	return data
}



//订单创建
export function payOders(params: any) {
	return request.post("order", params);
}

//微信支付
export function WeChatPay(id) {
	return request.post("order/pay/"+id);
}
